export const targetSumNumber = () => {
    const arr = [2, 7, 11, 15];
    const target = 9;
    const value: any[] = [];
    for (let i = 0; i < arr.length; i++) {
        const otherIndex = arr.indexOf(target - arr[i]);
        if (otherIndex !== -1 && !value.flat().includes(otherIndex)) {
            value.push([i, otherIndex]);
        }
    }
    return value;
};
